#include "Entity.h"

/*-----------------------------------------------------------------------------------------------*/
void Entity::draw(Renderer* renderer)
{
   renderer->setMatrixMode(WORLD);

   renderer->loadIdentity();
   
   renderer->Translate(m_position);
   
   renderer->RotateX(m_rotation.x * 3.14159f / 180.0f);
   renderer->RotateY(m_rotation.y * 3.14159f / 180.0f);
   renderer->RotateZ(m_rotation.z * 3.14159f / 180.0f);

   if (m_visible)
   {
      renderer->Scale(m_scale);
   }
   else
   {
      renderer->Scale(Vector3(0,0,0));
   }
}
/*-----------------------------------------------------------------------------------------------*/
void Entity::update(float deltaTime)
{
   if ( m_mooving )
   {
      m_prevPosition = m_position;
   }
}